package it.univaq.mwt.common.business;

import it.univaq.mwt.business.ListService;

public abstract class ListServiceFactory {

	private static ListServiceFactory instance;
	
	public abstract ListService getListService();
	

	protected ListServiceFactory() {
	}
	
	public synchronized static ListServiceFactory getInstance() {
		if (instance==null) {
			throw new RuntimeException();
		}
		return instance;
	}
	

	public synchronized static void setInstance(ListServiceFactory factory) {
		if (instance!=null) {
			throw new RuntimeException();
		}
		instance = factory;
		
	}

}
